package com.jxud.Pojo;

import java.time.LocalDateTime;

public class PageOrder {
    // 分页参数
    private int page = 1;
    private int size = 10;

    // 查询条件 (都是可选的)
    private String customerName;    // 客户姓名
    private String orderNumber;     // 订单号
    private String courierNumber;   // 快递单号
    private String orderStatus;     // 订单状态 (例如: 0, 1, 2)
    private String orderId;         // 订单id

    // 时间查询条件（可选）
    private LocalDateTime startTime;  // 开始时间，例如：2025-01-01 00:00:00
    private LocalDateTime endTime;    // 结束时间，例如：2025-12-31 23:59:59

    // 添加一个字段来存储计算好的 offset
    // 这个字段通常不需要前端传入，由后端计算
    private int offset;


    public LocalDateTime getStartTime() {
        return startTime;
    }

    public void setStartTime(LocalDateTime startTime) {
        this.startTime = startTime;
    }

    public LocalDateTime getEndTime() {
        return endTime;
    }

    public void setEndTime(LocalDateTime endTime) {
        this.endTime = endTime;
    }




    public PageOrder(int page, int size, String customerName, String orderNumber, String orderStatus, String courierNumber, int offset, LocalDateTime startTime) {
        this.page = page;
        this.size = size;
        this.customerName = customerName;
        this.orderNumber = orderNumber;
        this.orderStatus = orderStatus;
        this.courierNumber = courierNumber;
        this.offset = offset;
        this.startTime = startTime;
        this.endTime = startTime;
    }


    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getOrderNumber() {
        return orderNumber;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public int getOffset() {
        return offset;
    }

    public void setOffset(int offset) {
        this.offset = offset;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getCourierNumber() {
        return courierNumber;
    }

    public void setCourierNumber(String courierNumber) {}
}
